home *** CD-ROM | disk | FTP | other *** search
/ Chip: Hang es video / CHIP_ZENESZERKESZTO_2005.ISO / audio_3 / visual / robotfunk / setup.exe / {app} / main.dxr / Internal_21.ls < prev    next >
Encoding:
Text File  |  2003-11-19  |  820 b   |  20 lines

  1. on Blur startImg
  2.   doCrop = 1
  3.   if ilk(startImg) <> #image then
  4.     return VOID
  5.   end if
  6.   buffer = image(startImg.width + 4, startImg.height + 4, 24)
  7.   myrect = rect(0, 0, startImg.width, startImg.height)
  8.   offsetL = [[4, 4], [4, 0], [0, 4], [0, 0], [3, 4], [3, 0], [1, 4], [4, 3], [4, 1], [0, 3], [1, 0], [0, 1], [2, 0], [2, 4], [0, 2], [4, 2], [3, 3], [1, 1], [3, 1], [1, 3], [3, 2], [1, 2], [2, 3], [2, 1], [2, 2]]
  9.   blendLL = [0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 16, 16, 16, 16, 26, 26, 26, 26, 26]
  10.   repeat with j = 1 to 25
  11.     myBlend = blendLL[j] * 4
  12.     if not myBlend then
  13.       next repeat
  14.     end if
  15.     destRect = myrect.offset(offsetL[j][1], offsetL[j][2])
  16.     buffer.copyPixels(startImg, destRect, myrect, [#blendLevel: myBlend])
  17.   end repeat
  18.   return buffer.crop(myrect.offset(2, 2))
  19. end
  20.